package laMalinche.testingPlayGround.AnnotatedRules;

import laMalinche.testingPlayGround.testModel.PersonVo;
import laMalinche.AnnotatedRules.InScopeOf;
import laMalinche.AnnotatedRules.Rule;

/**
 * Created by IntelliJ IDEA.
 * User: ranran
 * Date: Aug 13, 2009
 * Time: 11:12:53 PM
 * To change this template use File | Settings | File Templates.
 */
public class PersonRules implements InScopeOf<PersonVo> {
    private PersonVo scope ;

    public PersonVo getScope() {
        return scope;
    }

    public void setScope(PersonVo scope) {
        scope = scope;
    }

    @Rule
    public void derivate(){
        getScope().setAge(getScope().getFather().getAge());
    }
}
